import { stringify } from 'qs';
import request from '@/utils/request';
import { formDataCode } from '@/utils/utils';


// 获取订单详情
export async function GetOrderDetails(params) {
      return request(`/${window.storeId}/Order/GetOrderDetails?${stringify(params)}`);
}
//修改备注
export async function SetOrderTag(params) {
      return request(`/${window.storeId}/Order/SetOrderTag`, {
            method: 'POST',
            headers: {
                  'Content-Type': "application/x-www-form-urlencoded",
            },
            body: formDataCode(params),
      });
}
//标记收款
export async function MarkedReceipt(params) {
      return request(`/${window.storeId}/Order/MarkedReceipt`, {
            method: 'POST',
            headers: {
                  'Content-Type': "application/x-www-form-urlencoded",
            },
            body: formDataCode(params),
      });
}
//延长收货
export async function SetExtendedDay(params) {
      return request(`/${window.storeId}/Order/SetExtendedDay`, {
            method: 'POST',
            headers: {
                  'Content-Type': "application/x-www-form-urlencoded",
            },
            body: formDataCode(params),
      });
}
// 保存订单设置
export async function SetStoreOrderConfig(params) {
      return request(`/${window.storeId}/Order/SetStoreOrderConfig`, {
            method: 'POST',
            body: {
                  ...params
            }
      });
}

// 退款
export async function ActiveRefund(params) {
    return request(`/${window.storeId}/Order/ActiveRefund`, {
          method: 'POST',
          body: {
                ...params
          }
    });
}

//获取订单设置
export async function GetStoreOrderConfig(params) {
      return request(`/${window.storeId}/Order/GetStoreOrderConfig?${stringify(params)}`);
}

//获取可退
export async function GetRefundMaxFee(params) {
    return request(`/${window.storeId}/Order/GetRefundMaxFee?${stringify(params)}`);
}


